package com.shujia.scala

import redis.clients.jedis.Jedis

object Demo9Redis {
  def main(args: Array[String]): Unit = {
    //1、创建数据库连接
    val jedis = new Jedis("master", 7000)

    //2、插入数据
    jedis.set("name","张三")

    //3、查询数据
    val name: String = jedis.get("name")
    println(name)

    jedis.close()
  }
}
